//
//  transformData.h
/*
 Copyright 2009 Jack Whitsitt
 Conact: sintixerr@gmail.com | http://sintixerr.wordpress.com
 
 This file is part of "pkviz".
 
 "pkviz" is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 
 "pkviz" is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with "pkviz".  If not, see <http://www.gnu.org/licenses/>.
 */ 

#import <Cocoa/Cocoa.h>
#import "pkGraphView.h"

#define FORWARD 0
#define BACK 1
#define	JUMP 2

@interface transformData : NSController {
	

	IBOutlet pkGraphView *theView; 
	IBOutlet NSTextField *testlabel;
	IBOutlet NSTextField *manualPacketNum;
	IBOutlet NSSliderCell *speedSlider;
	IBOutlet NSButton *playpauseButton;
//	IBOutlet NSWindow *packetTextWindow;
	
	int nextPacket;
	int iter;
	int pauseDisplay;
	int keypacket;
	int currentDirection;
	int ranOnce;
	int last_kp;
	
	float displaySpeed;
	NSNumber *demoSpeed;
	NSNumber *packetSetProgress;
	NSNumber *packetTextWindowVisible;
	NSString *pkText;
	NSNumber *expandedHeaderButtonEnabled;
	NSNumber *headersExpanded;
	
	NSMutableArray *bytepakposSet;
}


@property (retain, nonatomic) pkGraphView *theView;
@property (retain, nonatomic) NSTextField *manualPacketNum;
@property (retain, nonatomic) NSNumber *demoSpeed;
@property (retain, nonatomic) NSNumber *packetSetProgress;
@property (retain, nonatomic) NSButton *playpauseButton;
//@property (retain, nonatomic) NSWindow *packetTextWindow;
@property (retain, nonatomic) NSNumber *packetTextWindowVisible;
@property (retain, nonatomic) NSString *pkText;
@property (retain, nonatomic) NSNumber *expandedHeaderButtonEnabled;
@property (retain, nonatomic) NSNumber *headersExpanded;

- (void)formatPackets;
- (int)hexStringToInt: (NSString *)hexString;
- (void)packetEnumThread:(NSMutableArray *)pkset;
- (void)notifyPkGraphView:(NSArray *)aPacket inDirection:(int)dir;
- (void)packetEnumReceiver:(NSArray *)pkkp;
- (void)updateKeyPacket:(int)kp;
- (void)setPause;
- (void)unSetPause;

- (IBAction)setPacketNum:(id)sender;
- (IBAction)transData:(id)sender;
- (IBAction)haltDisplay:(id)sender;
- (IBAction)incrementPacket:(id)sender;
- (IBAction)decrementPacket:(id)sender;
- (IBAction)showPacketText:(id)sender;
- (IBAction)hidePacketText:(id)sender;

@end
